/*
package com.xl.jdbc.dao;

import com.xl.Resources;
import com.xl.jdbc.pojo.User;
import com.xl.sqlSession.SqlSession;
import com.xl.sqlSession.SqlSessionFactory;
import com.xl.sqlSession.SqlSessionFactoryBuilder;

import java.io.InputStream;
import java.util.List;

public class UserDaoImpl implements IUserDao {
    @Override
    public List<User> selectList() throws Exception {
        InputStream inputStream = Resources.getResourcesAsStream("sqlConfigMap.xml");
        SqlSessionFactoryBuilder sqlSessionFactoryBuilder = new SqlSessionFactoryBuilder();
        SqlSessionFactory sqlSessionFactory = sqlSessionFactoryBuilder.build(inputStream);
        //SqlSessionFactory 工厂类：生产sqlSession会话对象
        SqlSession sqlSession = sqlSessionFactory.openSession();

        List<User> objects = sqlSession.selectList("user.selectList");
        return  objects;
    }

    @Override
    public User selectOne(User user) throws Exception {
        InputStream inputStream = Resources.getResourcesAsStream("sqlConfigMap.xml");
        SqlSessionFactoryBuilder sqlSessionFactoryBuilder = new SqlSessionFactoryBuilder();
        SqlSessionFactory sqlSessionFactory = sqlSessionFactoryBuilder.build(inputStream);
        //SqlSessionFactory 工厂类：生产sqlSession会话对象
        SqlSession sqlSession = sqlSessionFactory.openSession();
        User user1 = sqlSession.selectOne("user.selectOne", user);
        return user1;
    }
}
*/
